#!/bin/bash
# postinst script for %NAME%
#
# see: dh_installdeb(1)

set -e

case "$1" in

    configure)    
		echo "Installing %NAME%..."
		BASE_NAME="%NAME%-%VERSION%"
        INSTALLDIR=%DESTDIR%/dist
		tar -C $INSTALLDIR -zxf $INSTALLDIR/$BASE_NAME.tar.gz
		pushd $INSTALLDIR/$BASE_NAME
		python setup.py --quiet install
		popd
		rm -fr $INSTALLDIR/$BASE_NAME
		rm -fr $INSTALLDIR/$BASE_NAME.tar.gz
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
